<?php if (!defined('THINK_PATH')) exit();?>﻿<?php echo '<?'; ?>
xml version="1.0" encoding="UTF-8"?>
<DOCUMENT>

<?php if(is_array($hero_list)): foreach($hero_list as $key=>$hero): ?><item>
	<key><![CDATA[<?php echo ($hero["hero_name"]); ?>]]></key><!-- 与左侧key必须一样 -->
	<display>
		<heroinfo>
			<title><![CDATA[<?php echo ($hero["hero_title"]); ?>]]></title>
			<skills>
				<name><![CDATA[英雄技能]]></name>
				<?php if(is_array($hero["skill_img"])): foreach($hero["skill_img"] as $key=>$skill_img): ?><skill>
					<name><![CDATA[<?php echo ($hero["skill_name"]["$key"]); ?>]]></name>
					<img><![CDATA[<?php echo ($skill_img); ?>]]></img><!-- 图片大小为正方形，大小51px * 51px -->
					<url><![CDATA[http://www.haosou.com]]></url>
				</skill><?php endforeach; endif; ?>
			</skills>
			<info>
				<name><![CDATA[优势]]></name>
				<summary><![CDATA[<?php echo ($hero["hero_advantage"]); ?>]]></summary>
			</info>
			<info>
				<name><![CDATA[劣势]]></name>
				<summary><![CDATA[<?php echo ($hero["hero_inferior"]); ?>]]></summary>
			</info>
		</heroinfo>
		<module>
			<title><![CDATA[最佳搭档]]></title>
			
			<?php if(is_array($hero["good_hero_name"])): foreach($hero["good_hero_name"] as $key=>$hero_name): ?><info>
				<name><![CDATA[<?php echo ($hero_name); ?>]]></name>
				<img><![CDATA[<?php echo ($hero["good_hero_img"]["$key"]); ?>]]></img>
				<summary><![CDATA[<?php echo ($hero["good_hero_desc"]["$key"]); ?>]]></summary>
				<url><![CDATA[<?php echo ($hero["good_hero_url"]["$key"]); ?>]]></url>
			</info><?php endforeach; endif; ?>
		</module>
		<module>
			<title><![CDATA[克制英雄]]></title>
			<?php if(is_array($hero["bad_hero_name"])): foreach($hero["bad_hero_name"] as $key=>$hero_name): ?><info>
				<name><![CDATA[<?php echo ($hero_name); ?>]]></name>
				<img><![CDATA[<?php echo ($hero["bad_hero_img"]["$key"]); ?>]]></img>
				<summary><![CDATA[<?php echo ($hero["bad_hero_desc"]["$Key"]); ?>]]></summary>
				<url><![CDATA[<?php echo ($hero["bad_hero_url"]["$key"]); ?>]]></url>
			</info><?php endforeach; endif; ?>
		</module>
	</display>
</item><?php endforeach; endif; ?>

</DOCUMENT>